package com.simple.datax.seda.internal;
import java.util.ArrayList;
import com.simple.datax.seda.api.StageWrapperIF;
import com.simple.datax.seda.core.event.StageInterruptEvent;
public class StageController {
	ArrayList<StageWrapperIF> stageArray = new ArrayList<StageWrapperIF>();

	public void addStage(StageWrapperIF stage) {
		stageArray.add(stage);
	}

	public void forceStop() {
		System.exit(-1);
	}

	public void quietStop() {
		for (StageWrapperIF stage : stageArray) {
			stage.putEvent(new StageInterruptEvent());
		}
	}

}
